package homework.day03;

import java.util.Scanner;

/**
 * @author ThinkBook
 */
public class Test10 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输⼊⼀个正整数：");
        int num = sc.nextInt();
        int sum = 0;
        for (int i = 1; i < num; i++) {
            if (num % i == 0) {
                sum += i;
            }
        }
        if (sum == num) {
            System.out.println(num + "是⼀个完全数");
        } else {
            System.out.println(num + "不是⼀个完全数");
        }
    }
}
